package noname;

public class Demo02 {
    public static void main(String[] args) {
        Animal a1 = new Animal("小白");
        feed(a1);


        feed(new Animal("小猪")); //假设new Animal("小猪")的地址值为0x3C
    }

    public static void feed(Animal a) {//Animal a=new Animal("小白");
        System.out.println(a.name);    //Animal a = new Animal("小猪")
    }
}
